<?php
$this->breadcrumbs = array(
	'Quản lý Sự kiện',
);
?>
 <?php 
$criteria = new CDbCriteria();
$criteria->condition = 'member_id = :member_id';
$criteria->params = array(':member_id' => $member->id);
$count = Events::model()->count($criteria);
  ?>
<div class="row">
	<div class="col-md-12">
    	<div class="portlet">
        	<div class="portlet-title">
            	<div class="caption"><i class="icon-bar-chart"></i>Danh sách sự kiện của : <strong><?php echo $member->username ; ?></strong> <span class="badge badge-success"> <?php echo $count ?></span></div>
                <div class="actions">
                    	<?php echo CHtml::link('<span><i class="icon-plus"></i> Đăng sự kiện</span>', array('/Events/default/create'), array('class'=>'btn blue btn-sm')); ?>
                </div>
            </div>
<div class="portlet-body">
<div class="event-list">
 <?php $this->widget('zii.widgets.CListView', array(
	'id'=>'event-list',
	'dataProvider'=>$dataProvider,
	'itemView'=>'_eventMembers',
	'summaryText'=>'',//'Hiển thị sự kiện trang {page}/{pages}',
	'summaryCssClass'=>'text-right',
	'afterAjaxUpdate'=>'js: function(){
		$("html, body").animate({
			scrollTop: $("#event-list").offset().top
		}, 2000);
	}',
	'pagerCssClass'=>'text-center',
	'pager'=>array(
        'header'=>'',
		'maxButtonCount'=>10,
        'header'=>'',
        'prevPageLabel'=>'&laquo;',
        'nextPageLabel'=>'&raquo;',
        'firstPageLabel'=>'Trang đầu',
        'lastPageLabel'=>'Trang cuối',
        'footer'=>'',
		'selectedPageCssClass'=>'active',
		'hiddenPageCssClass'=>'disabled',
        'htmlOptions'=>array(
            'class'=>'pagination pagination-sm',
        ),
    ),
	'htmlOptions'=>array(
		'class'=>''
	),
)); ?>
</div>
            </div>
        </div>
    </div>
</div>